package com.yilin.platform.entity.aliPay;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.platform.base_core.application.BaseEntity;
import com.yilin.platform.base_core.application.CapitalBaseEntity;
import com.yilin.platform.base_core.application.FlowField;
import com.yilin.platform.entity.pab.PabTradeRecord;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "ali_pay_trade_record")
@TableName(value = "ali_pay_trade_record")
public class AliPayTradeRecord extends CapitalBaseEntity {
    public enum AliPayTradeType {
        payment(0, "付款"),
        refund(1, "退款");
        @EnumValue
        public Integer index;
        public String name;

        AliPayTradeType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum UserType {
        shipperUser(0, "货主用户"),
        truckerUser(1, "车主用户");
        @EnumValue
        public Integer index;
        public String name;

        UserType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum AliPayType {
        app(0, "APP支付"),
        web(1, "网页支付");
        @EnumValue
        public Integer index;
        public String name;

        AliPayType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum  AliPayTradeStatus {
        create(0, "创建"),
        success(1, "交易成功"),
        fail(2, "交易失败"),
        handle(3, "处理中"),
        close(4, "交易关闭"),
        notpay(5, "未支付");
        @EnumValue
        public Integer index;
        public String name;

        AliPayTradeStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    @Column(name = "ali_pay_trade_type")
    private AliPayTradeType aliPayTradeType ;//交易类型
    @Column(name = "ali_pay_trade_status")
    private AliPayTradeStatus aliPayTradeStatus;//交易状态
    @Column(name = "trade_name")
    private String tradeName;//交易名称
    @Column(name = "user_type")
    private UserType userType;//用户类型
    @Column(name = "ali_pay_type")
    private AliPayType aliPayType;//付款方式

    @Column(name = "refund_original_trade_no")
    private String refundOriginalTradeNo;//退款原交易订单号
    @Column(name = "remark")
    private String remark;//备注

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRefundOriginalTradeNo() {
        return refundOriginalTradeNo;
    }

    public void setRefundOriginalTradeNo(String refundOriginalTradeNo) {
        this.refundOriginalTradeNo = refundOriginalTradeNo;
    }

    public AliPayType getAliPayType() {
        return aliPayType;
    }

    public void setAliPayType(AliPayType aliPayType) {
        this.aliPayType = aliPayType;
    }

    public AliPayTradeType getAliPayTradeType() {
        return aliPayTradeType;
    }

    public UserType getUserType() {
        return userType;
    }

    public void setUserType(UserType userType) {
        this.userType = userType;
    }

    public void setAliPayTradeType(AliPayTradeType aliPayTradeType) {
        this.aliPayTradeType = aliPayTradeType;
    }

    public AliPayTradeStatus getAliPayTradeStatus() {
        return aliPayTradeStatus;
    }

    public void setAliPayTradeStatus(AliPayTradeStatus aliPayTradeStatus) {
        this.aliPayTradeStatus = aliPayTradeStatus;
    }

    public String getTradeName() {
        return tradeName;
    }

    public void setTradeName(String tradeName) {
        this.tradeName = tradeName;
    }
}
